package com.stageadminserver.adminserver.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.stagecommon.common.pojo.Category;
import com.stagecommon.common.pojo.RespBean;
import com.stagecommon.common.vo.CategoryVo;

public interface CategoryService extends IService<Category> {

    /**
     * 获取所有二级分类
     * @return
     */
    RespBean listSecondCategories();

    /**
     * 分页获取所有分类
     * @param currentPage
     * @param size
     * @param category
     * @return
     */
    RespBean<IPage<Category>> getAllCategory(Integer currentPage, Integer size, Category category);

    /**
     * 新增分类
     * @param category
     * @return
     */
    RespBean<Integer> addCategory(CategoryVo category);

    /**
     * 修改分类
     * @param category
     * @return
     */
    RespBean<Integer> editCategoryName(Category category);

    /**
     * 根据分类id获取分类信息
     * @param category
     * @return
     */
    RespBean<Category> selectCategoryById(Category category);

    /**
     * 根据分类id删除分类
     * @param category
     * @return
     */
    RespBean<Integer> deleteCategoryById(Category category);
}
